


const toPng = () => {
    location.href = 'views/tools/png.html'
}



function init(){
    const list = [
        {
            name:'图片压缩',
            path:'views/tools/png.html'
        },
        {
            name:'网页转pdf',
            path:'views/tools/pdf.html'
        }
    ]
    const container = document.querySelector('.menu-container')
    for(let i in list){
        const item = document.createElement('div')
        item.className = 'item'
        item.innerText = list[i].name
        item.onclick = () => {
            location.href = list[i].path
        }
        container.appendChild(item)
    }
}

init()